function [yTot, yF, yPhi, tList, noiseF, noisePhi] = noiseSim(maxT, nT, lpsdF, lpsdPhi, plant, flter, seed)
%NOISESIM Summary of this function goes here
%   Detailed explanation goes here
    global Kp Ki Kd;
    rng(seed);
    q1f = Qd1f(Kp, Ki, Kd, plant, flter);
%     q1p = Qd1phi(Kp, Ki, Kd, plant, flter);
    q2f = Qd2f(Kp, Ki, Kd, plant, flter);
%     q2p = Qd2phi(Kp, Ki, Kd, plant, flter);

    [noiseF, ~] = cn(maxT, nT, lpsdF, 1);
    [noisePhi, tList]=cn(maxT, nT, lpsdPhi, 1);
    
    yF=lsim(q1f, noiseF, tList);
    yPhi=lsim(q2f, noisePhi, tList);
    yTot = yF+yPhi;
end

